package com.htstar.ovms.report.controller;

import com.htstar.ovms.common.core.util.R;
import com.htstar.ovms.report.api.req.ByMonthReportReq;
import com.htstar.ovms.report.api.vo.BorderReportVO;
import com.htstar.ovms.report.api.vo.OnlineRateReportVO;
import com.htstar.ovms.report.api.vo.OverSpeedReportVO;
import com.htstar.ovms.report.service.DeviceAlarmReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("deviceReport")
@Api(value = "车辆上线率报表", tags = "车辆上线率报表/Vehicle on line report")
public class DeviceAlarmReportController {

    @Autowired
    DeviceAlarmReportService deviceAlarmReportService;

    @RequestMapping("/onlineMonth")
    @ApiOperation(value = "按照月份统计/Statistics by month", notes = "")
    public R onlineMonth(@RequestBody ByMonthReportReq req) {
        R r = deviceAlarmReportService.onlineMonth(req);
        return r;
    }

    @RequestMapping("/onlineCar")
    @ApiOperation(value = "按照车辆统计/According to vehicle statistics", notes = "")
    public R onlineCar(@RequestBody ByMonthReportReq req) {
        R rs = deviceAlarmReportService.onlineCar(req);
        return rs;
    }

//    @RequestMapping("/overSpeedByMonth")
//    public R overSpeedByMonth(@RequestBody ByMonthReportReq req) {
//        OverSpeedReportVO rs = deviceAlarmReportService.overSpeedByMonth(req);
//        return R.ok(rs);
//    }
//
//    @RequestMapping("/overSpeedByCar")
//    public R overSpeedByCar(@RequestBody ByMonthReportReq req) {
//        OverSpeedReportVO rs = deviceAlarmReportService.overSpeedByCar(req);
//        return R.ok(rs);
//    }
//
//    @RequestMapping("/overSpeedByPerson")
//    public R overSpeedByPerson(@RequestBody ByMonthReportReq req) {
//        OverSpeedReportVO rs = deviceAlarmReportService.overSpeedByPerson(req);
//        return R.ok(rs);
//    }
//
//    @RequestMapping("/borderByMonth")
//    public R borderByMonth(@RequestBody ByMonthReportReq req) {
//        BorderReportVO rs = deviceAlarmReportService.borderByMonth(req);
//        return R.ok(rs);
//    }
//
//    @RequestMapping("/borderByCar")
//    public R borderByCar(@RequestBody ByMonthReportReq req) {
//        BorderReportVO rs = deviceAlarmReportService.borderByCar(req);
//        return R.ok(rs);
//    }
//
//    @RequestMapping("/borderByPerson")
//    public R borderByPerson(@RequestBody ByMonthReportReq req) {
//        BorderReportVO rs = deviceAlarmReportService.borderByPerson(req);
//        return R.ok(rs);
//    }
}
